package cate.game.role.res.guild.msg.member.pos;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdGuild;
import easy.java.dev.note.NoteField;

@ClientMsg(title = "罢免长老 の 请求")
public class DismissPresbyterReq implements MsgInput {
    @NoteField(value = "罢免的长老id")
    public String uId;

    @Override
    public MsgConfig conf() {
        return MsgIdGuild.GUILD_DISMISS_PRESBYTER_REQ;
    }

    @Override
    public void execute(GameBody game, ClientContext cc) {
        if (!cc.getRole().getRes().guild.checkGuild().ok()) {
            game.notice.message(cc.getRole(),310450 ,"尚未加入公会");
            return;
        }
        cc.getRole().getRes().guild.getGuild().member.dismissPresbyter(cc.getRole(), uId);
    }
}
